<template>
	<view style='padding:15px;'>
		<u--form :model="formSearch" ref="form1">
			<u-form-item label="课程名称" prop="name" labelWidth='150'>
				<u--input v-model="formSearch.name"></u--input>
			</u-form-item>
			<u-form-item label="课程类型" prop="course" @click="showSex = true;" labelWidth='150'>
				<u--input v-model="formSearch.course" placeholder="请选择课程">
				</u--input>
			</u-form-item>
		</u--form>
		<u-action-sheet :show="showSex" :actions="actions" title="请选择课程" @close="showSex = false" @select="sexSelect">
		</u-action-sheet>
		<u-button style='margin:15px auto;width:80%;' type="primary" size="large" @click="btnSearch()">查询</u-button>
		<u-button style='margin:15px auto;width:80%;' type="primary" size="large" @click="btnReset()">重置</u-button>
	</view>
</template>
<script>
	export default {
		components: {},
		data() {
			return {
				formSearch: {
					name: "",
					course: ""
				},
				showCourse: false,
				showSex: false,
				actions: [{
						name: '课程1',
					},
					{
						name: '课程2',
					},
				],

			}
		},
		onLoad() {},
		methods: {
			// 查询
			btnSearch() {
				// this.$goBack('../onLineStudy/index', 2);
				console.log(1312,this.$parent)
			},

			sexSelect(e) {
				this.formSearch.course = e.name
			},
			
			// 重置
			btnReset() {
				this.$refs.form1.resetFields()
			}


		}
	}
</script>

<style lang="scss" scoped>
</style>
